\(\int (a+b x) (c+d x)^{-5+n} (e+f x)^{-n} \, dx\) [3052]
Optimal result
Integrand size = 24, antiderivative size = 299 \[
\int (a+b x) (c+d x)^{-5+n} (e+f x)^{-n} \, dx=\frac {(b c-a d) (c+d x)^{-4+n} (e+f x)^{1-n}}{d (d e-c f) (4-n)}+\frac {(3 a d f+b (c f (1-n)-d e (4-n))) (c+d x)^{-3+n} (e+f x)^{1-n}}{d (d e-c f)^2 (3-n) (4-n)}-\frac {2 f (3 a d f+b (c f (1-n)-d e (4-n))) (c+d x)^{-2+n} (e+f x)^{1-n}}{d (d e-c f)^3 (2-n) (3-n) (4-n)}+\frac {2 f^2 (3 a d f+b (c f (1-n)-d e (4-n))) (c+d x)^{-1+n} (e+f x)^{1-n}}{d (d e-c f)^4 (1-n) (2-n) (3-n) (4-n)}
\]
[Out]
(-a*d+b*c)*(d*x+c)^(-4+n)*(f*x+e)^(1-n)/d/(-c*f+d*e)/(4-n)+(3*a*d*f+b*(c*f*(1-n)-d*e*(4-n)))*(d*x+c)^(-3+n)*(f
*x+e)^(1-n)/d/(-c*f+d*e)^2/(3-n)/(4-n)-2*f*(3*a*d*f+b*(c*f*(1-n)-d*e*(4-n)))*(d*x+c)^(-2+n)*(f*x+e)^(1-n)/d/(-
c*f+d*e)^3/(2-n)/(3-n)/(4-n)+2*f^2*(3*a*d*f+b*(c*f*(1-n)-d*e*(4-n)))*(d*x+c)^(-1+n)*(f*x+e)^(1-n)/d/(-c*f+d*e)
^4/(1-n)/(2-n)/(3-n)/(4-n)
Rubi [A] (verified)
Time = 0.13 (sec) , antiderivative size = 296, normalized size of antiderivative = 0.99, number
of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {80, 47, 37}
\[
\int (a+b x) (c+d x)^{-5+n} (e+f x)^{-n} \, dx=\frac {2 f^2 (c+d x)^{n-1} (e+f x)^{1-n} (3 a d f+b c f (1-n)-b d e (4-n))}{d (1-n) (2-n) (3-n) (4-n) (d e-c f)^4}+\frac {(b c-a d) (c+d x)^{n-4} (e+f x)^{1-n}}{d (4-n) (d e-c f)}+\frac {(c+d x)^{n-3} (e+f x)^{1-n} (3 a d f+b c f (1-n)-b d e (4-n))}{d (3-n) (4-n) (d e-c f)^2}-\frac {2 f (c+d x)^{n-2} (e+f x)^{1-n} (3 a d f+b c f (1-n)-b d e (4-n))}{d (2-n) (3-n) (4-n) (d e-c f)^3}
\]
[In]
Int[((a + b*x)*(c + d*x)^(-5 + n))/(e + f*x)^n,x]
[Out]
((b*c - a*d)*(c + d*x)^(-4 + n)*(e + f*x)^(1 - n))/(d*(d*e - c*f)*(4 - n)) + ((3*a*d*f + b*c*f*(1 - n) - b*d*e
*(4 - n))*(c + d*x)^(-3 + n)*(e + f*x)^(1 - n))/(d*(d*e - c*f)^2*(3 - n)*(4 - n)) - (2*f*(3*a*d*f + b*c*f*(1 -
n) - b*d*e*(4 - n))*(c + d*x)^(-2 + n)*(e + f*x)^(1 - n))/(d*(d*e - c*f)^3*(2 - n)*(3 - n)*(4 - n)) + (2*f^2*
(3*a*d*f + b*c*f*(1 - n) - b*d*e*(4 - n))*(c + d*x)^(-1 + n)*(e + f*x)^(1 - n))/(d*(d*e - c*f)^4*(1 - n)*(2 -
n)*(3 - n)*(4 - n))
Rule 37
Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(a + b*x)^(m + 1)*((c + d*x)^(n +
1)/((b*c - a*d)*(m + 1))), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[m + n + 2, 0] && NeQ
[m, -1]
Rule 47
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(a + b*x)^(m + 1)*((c + d*x)^(n + 1
)/((b*c - a*d)*(m + 1))), x] - Dist[d*(Simplify[m + n + 2]/((b*c - a*d)*(m + 1))), Int[(a + b*x)^Simplify[m +
1]*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[b*c - a*d, 0] && ILtQ[Simplify[m + n + 2], 0] &&
NeQ[m, -1] && !(LtQ[m, -1] && LtQ[n, -1] && (EqQ[a, 0] || (NeQ[c, 0] && LtQ[m - n, 0] && IntegerQ[n]))) && (
SumSimplerQ[m, 1] || !SumSimplerQ[n, 1])
Rule 80
Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[(-(b*e - a*f
))*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(f*(p + 1)*(c*f - d*e))), x] - Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1
) + c*f*(p + 1)))/(f*(p + 1)*(c*f - d*e)), Int[(c + d*x)^n*(e + f*x)^Simplify[p + 1], x], x] /; FreeQ[{a, b, c
, d, e, f, n, p}, x] && !RationalQ[p] && SumSimplerQ[p, 1]
Rubi steps \begin{align*}
\text {integral}& = \frac {(b c-a d) (c+d x)^{-4+n} (e+f x)^{1-n}}{d (d e-c f) (4-n)}-\frac {(3 a d f+b c f (1-n)-b d e (4-n)) \int (c+d x)^{-4+n} (e+f x)^{-n} \, dx}{d (d e-c f) (4-n)} \\ & = \frac {(b c-a d) (c+d x)^{-4+n} (e+f x)^{1-n}}{d (d e-c f) (4-n)}+\frac {(3 a d f+b c f (1-n)-b d e (4-n)) (c+d x)^{-3+n} (e+f x)^{1-n}}{d (d e-c f)^2 (3-n) (4-n)}+\frac {(2 f (3 a d f+b c f (1-n)-b d e (4-n))) \int (c+d x)^{-3+n} (e+f x)^{-n} \, dx}{d (d e-c f)^2 (3-n) (4-n)} \\ & = \frac {(b c-a d) (c+d x)^{-4+n} (e+f x)^{1-n}}{d (d e-c f) (4-n)}+\frac {(3 a d f+b c f (1-n)-b d e (4-n)) (c+d x)^{-3+n} (e+f x)^{1-n}}{d (d e-c f)^2 (3-n) (4-n)}-\frac {2 f (3 a d f+b c f (1-n)-b d e (4-n)) (c+d x)^{-2+n} (e+f x)^{1-n}}{d (d e-c f)^3 (2-n) (3-n) (4-n)}-\frac {\left (2 f^2 (3 a d f+b c f (1-n)-b d e (4-n))\right ) \int (c+d x)^{-2+n} (e+f x)^{-n} \, dx}{d (d e-c f)^3 (2-n) (3-n) (4-n)} \\ & = \frac {(b c-a d) (c+d x)^{-4+n} (e+f x)^{1-n}}{d (d e-c f) (4-n)}+\frac {(3 a d f+b c f (1-n)-b d e (4-n)) (c+d x)^{-3+n} (e+f x)^{1-n}}{d (d e-c f)^2 (3-n) (4-n)}-\frac {2 f (3 a d f+b c f (1-n)-b d e (4-n)) (c+d x)^{-2+n} (e+f x)^{1-n}}{d (d e-c f)^3 (2-n) (3-n) (4-n)}+\frac {2 f^2 (3 a d f+b c f (1-n)-b d e (4-n)) (c+d x)^{-1+n} (e+f x)^{1-n}}{d (d e-c f)^4 (1-n) (2-n) (3-n) (4-n)} \\
\end{align*}
Mathematica [A] (verified)
Time = 0.22 (sec) , antiderivative size = 165, normalized size of antiderivative = 0.55
\[
\int (a+b x) (c+d x)^{-5+n} (e+f x)^{-n} \, dx=\frac {(c+d x)^{-4+n} (e+f x)^{1-n} \left (-b c+a d+\frac {(3 a d f+b d e (-4+n)-b c f (-1+n)) (c+d x) \left (c^2 f^2 \left (6-5 n+n^2\right )-2 c d f (-3+n) (e (-1+n)+f x)+d^2 \left (e^2 \left (2-3 n+n^2\right )+2 e f (-1+n) x+2 f^2 x^2\right )\right )}{(d e-c f)^3 (-3+n) (-2+n) (-1+n)}\right )}{d (d e-c f) (-4+n)}
\]
[In]
Integrate[((a + b*x)*(c + d*x)^(-5 + n))/(e + f*x)^n,x]
[Out]
((c + d*x)^(-4 + n)*(e + f*x)^(1 - n)*(-(b*c) + a*d + ((3*a*d*f + b*d*e*(-4 + n) - b*c*f*(-1 + n))*(c + d*x)*(
c^2*f^2*(6 - 5*n + n^2) - 2*c*d*f*(-3 + n)*(e*(-1 + n) + f*x) + d^2*(e^2*(2 - 3*n + n^2) + 2*e*f*(-1 + n)*x +
2*f^2*x^2)))/((d*e - c*f)^3*(-3 + n)*(-2 + n)*(-1 + n))))/(d*(d*e - c*f)*(-4 + n))
Maple [B] (verified)
Leaf count of result is larger than twice the leaf count of optimal. \(1186\) vs. \(2(299)=598\).
Time = 5.06 (sec) , antiderivative size = 1187, normalized size of antiderivative =
3.97
| | |
method | result | size |
| | |
gosper |
\(\text {Expression too large to display}\) |
\(1187\) |
parallelrisch |
\(\text {Expression too large to display}\) |
\(3499\) |
| | |
|
|
|
[In]
int((b*x+a)*(d*x+c)^(-5+n)/((f*x+e)^n),x,method=_RETURNVERBOSE)
[Out]
-(d*x+c)^(-4+n)*(f*x+e)/((f*x+e)^n)/(c^4*f^4*n^4-4*c^3*d*e*f^3*n^4+6*c^2*d^2*e^2*f^2*n^4-4*c*d^3*e^3*f*n^4+d^4
*e^4*n^4-10*c^4*f^4*n^3+40*c^3*d*e*f^3*n^3-60*c^2*d^2*e^2*f^2*n^3+40*c*d^3*e^3*f*n^3-10*d^4*e^4*n^3+35*c^4*f^4
*n^2-140*c^3*d*e*f^3*n^2+210*c^2*d^2*e^2*f^2*n^2-140*c*d^3*e^3*f*n^2+35*d^4*e^4*n^2-50*c^4*f^4*n+200*c^3*d*e*f
^3*n-300*c^2*d^2*e^2*f^2*n+200*c*d^3*e^3*f*n-50*d^4*e^4*n+24*c^4*f^4-96*c^3*d*e*f^3+144*c^2*d^2*e^2*f^2-96*c*d
^3*e^3*f+24*d^4*e^4)*(b*c^3*f^3*n^3*x-3*b*c^2*d*e*f^2*n^3*x-2*b*c^2*d*f^3*n^2*x^2+3*b*c*d^2*e^2*f*n^3*x+4*b*c*
d^2*e*f^2*n^2*x^2+2*b*c*d^2*f^3*n*x^3-b*d^3*e^3*n^3*x-2*b*d^3*e^2*f*n^2*x^2-2*b*d^3*e*f^2*n*x^3+a*c^3*f^3*n^3-
3*a*c^2*d*e*f^2*n^3-3*a*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
Leaf count of result is larger than twice the leaf count of optimal. 1741 vs. \(2 (271) = 542\).
Time = 0.29 (sec) , antiderivative size = 1741, normalized size of antiderivative = 5.82
\[
\int (a+b x) (c+d x)^{-5+n} (e+f x)^{-n} \, dx=\text {Too large to display}
\]
[In]
integrate((b*x+a)*(d*x+c)^(-5+n)/((f*x+e)^n),x, algorithm="fricas")
[Out]
(24*a*c^4*e*f^3 - 2*(4*b*d^4*e*f^3 - (b*c*d^3 + 3*a*d^4)*f^4 - (b*d^4*e*f^3 - b*c*d^3*f^4)*n)*x^5 - 2*(b*c^2*d
^2 + 3*a*c*d^3)*e^4 + 8*(b*c^3*d + 3*a*c^2*d^2)*e^3*f - 12*(b*c^4 + 3*a*c^3*d)*e^2*f^2 - 2*(20*b*c*d^3*e*f^3 -
5*(b*c^2*d^2 + 3*a*c*d^3)*f^4 - (b*d^4*e^2*f^2 - 2*b*c*d^3*e*f^3 + b*c^2*d^2*f^4)*n^2 + (4*b*d^4*e^2*f^2 - (1
0*b*c*d^3 + 3*a*d^4)*e*f^3 + 3*(2*b*c^2*d^2 + a*c*d^3)*f^4)*n)*x^4 + (a*c*d^3*e^4 - 3*a*c^2*d^2*e^3*f + 3*a*c^
3*d*e^2*f^2 - a*c^4*e*f^3)*n^3 - (80*b*c^2*d^2*e*f^3 - 20*(b*c^3*d + 3*a*c^2*d^2)*f^4 - (b*d^4*e^3*f - 3*b*c*d
^3*e^2*f^2 + 3*b*c^2*d^2*e*f^3 - b*c^3*d*f^4)*n^3 + (5*b*d^4*e^3*f - (20*b*c*d^3 + 3*a*d^4)*e^2*f^2 + (25*b*c^
2*d^2 + 6*a*c*d^3)*e*f^3 - (10*b*c^3*d + 3*a*c^2*d^2)*f^4)*n^2 - (4*b*d^4*e^3*f - (41*b*c*d^3 + 3*a*d^4)*e^2*f
^2 + 6*(11*b*c^2*d^2 + 5*a*c*d^3)*e*f^3 - (29*b*c^3*d + 27*a*c^2*d^2)*f^4)*n)*x^3 + (9*a*c^4*e*f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*b*c^2*d^2 + 18*a*c*d^3)*e^3*f -
(22*b*c^3*d + 9*a*c^2*d^2)*e^2*f^2 + (7*b*c^4 - 12*a*c^3*d)*e*f^3)*n^2 - (26*a*c^4*f^4 - (17*b*c*d^3 + 11*a*d^
4)*e^4 + 20*(3*b*c^2*d^2 + 2*a*c*d^3)*e^3*f - 5*(11*b*c^3*d + 9*a*c^2*d^2)*e^2*f^2 + 2*(6*b*c^4 - 5*a*c^3*d)*e
*f^3)*n)*x)*(d*x + c)^(n - 5)/((24*d^4*e^4 - 96*c*d^3*e^3*f + 144*c^2*d^2*e^2*f^2 - 96*c^3*d*e*f^3 + 24*c^4*f^
4 + (d^4*e^4 - 4*c*d^3*e^3*f + 6*c^2*d^2*e^2*f^2 - 4*c^3*d*e*f^3 + c^4*f^4)*n^4 - 10*(d^4*e^4 - 4*c*d^3*e^3*f
+ 6*c^2*d^2*e^2*f^2 - 4*c^3*d*e*f^3 + c^4*f^4)*n^3 + 35*(d^4*e^4 - 4*c*d^3*e^3*f + 6*c^2*d^2*e^2*f^2 - 4*c^3*d
*e*f^3 + c^4*f^4)*n^2 - 50*(d^4*e^4 - 4*c*d^3*e^3*f + 6*c^2*d^2*e^2*f^2 - 4*c^3*d*e*f^3 + c^4*f^4)*n)*(f*x + e
)^n)
Sympy [F(-2)]
Exception generated. \[
\int (a+b x) (c+d x)^{-5+n} (e+f x)^{-n} \, dx=\text {Exception raised: HeuristicGCDFailed}
\]
[In]
integrate((b*x+a)*(d*x+c)**(-5+n)/((f*x+e)**n),x)
[Out]
Exception raised: HeuristicGCDFailed >> no luck
Maxima [F]
\[
\int (a+b x) (c+d x)^{-5+n} (e+f x)^{-n} \, dx=\int { \frac {{\left (b x + a\right )} {\left (d x + c\right )}^{n - 5}}{{\left (f x + e\right )}^{n}} \,d x }
\]
[In]
integrate((b*x+a)*(d*x+c)^(-5+n)/((f*x+e)^n),x, algorithm="maxima")
[Out]
integrate((b*x + a)*(d*x + c)^(n - 5)/(f*x + e)^n, x)
Giac [F]
\[
\int (a+b x) (c+d x)^{-5+n} (e+f x)^{-n} \, dx=\int { \frac {{\left (b x + a\right )} {\left (d x + c\right )}^{n - 5}}{{\left (f x + e\right )}^{n}} \,d x }
\]
[In]
integrate((b*x+a)*(d*x+c)^(-5+n)/((f*x+e)^n),x, algorithm="giac")
[Out]
integrate((b*x + a)*(d*x + c)^(n - 5)/(f*x + e)^n, x)
Mupad [B] (verification not implemented)
Time = 5.33 (sec) , antiderivative size = 1657, normalized size of antiderivative = 5.54
\[
\int (a+b x) (c+d x)^{-5+n} (e+f x)^{-n} \, dx=\text {Too large to display}
\]
[In]
int(((a + b*x)*(c + d*x)^(n - 5))/(e + f*x)^n,x)
[Out]
(x*(c + d*x)^(n - 5)*(24*a*c^4*f^4 - 6*a*d^4*e^4 + 9*a*c^4*f^4*n^2 - 6*a*d^4*e^4*n^2 - a*c^4*f^4*n^3 + a*d^4*e
^4*n^3 - 10*b*c*d^3*e^4 - 26*a*c^4*f^4*n + 11*a*d^4*e^4*n + 24*a*c*d^3*e^3*f + 24*a*c^3*d*e*f^3 + 17*b*c*d^3*e
^4*n - 12*b*c^4*e*f^3*n + 40*b*c^2*d^2*e^3*f - 60*b*c^3*d*e^2*f^2 - 8*b*c*d^3*e^4*n^2 + b*c*d^3*e^4*n^3 + 7*b*
c^4*e*f^3*n^2 - b*c^4*e*f^3*n^3 - 36*a*c^2*d^2*e^2*f^2 + 45*a*c^2*d^2*e^2*f^2*n + 23*b*c^2*d^2*e^3*f*n^2 - 22*
b*c^3*d*e^2*f^2*n^2 - 3*b*c^2*d^2*e^3*f*n^3 + 3*b*c^3*d*e^2*f^2*n^3 - 40*a*c*d^3*e^3*f*n + 10*a*c^3*d*e*f^3*n
- 9*a*c^2*d^2*e^2*f^2*n^2 + 18*a*c*d^3*e^3*f*n^2 - 12*a*c^3*d*e*f^3*n^2 - 2*a*c*d^3*e^3*f*n^3 + 2*a*c^3*d*e*f^
3*n^3 - 60*b*c^2*d^2*e^3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*d^3*e^2*f^2*n^3 + 3*a*c^2*d^2*e*f^3*n^3 + 15*b*c^2*d^2*e^2*f^2*n - 46*b*c*d^3*e^3*f*n + 36
*b*c^3*d*e*f^3*n - 3*b*c^2*d^2*e^2*f^2*n^2 - 15*a*c*d^3*e^2*f^2*n + 60*a*c^2*d^2*e*f^3*n + 16*b*c*d^3*e^3*f*n^
2 - 14*b*c^3*d*e*f^3*n^2 - 2*b*c*d^3*e^3*f*n^3 + 2*b*c^3*d*e*f^3*n^3))/((e + f*x)^n*(c*f - d*e)^4*(35*n^2 - 50
*n - 10*n^3 + n^4 + 24)) + (2*d^3*f^3*x^5*(c + d*x)^(n - 5)*(3*a*d*f + b*c*f - 4*b*d*e - b*c*f*n + b*d*e*n))/(
(e + f*x)^n*(c*f - d*e)^4*(35*n^2 - 50*n - 10*n^3 + n^4 + 24)) + (2*d^2*f^2*x^4*(c + d*x)^(n - 5)*(5*c*f - c*f
*n + d*e*n)*(3*a*d*f + b*c*f - 4*b*d*e - b*c*f*n + b*d*e*n))/((e + f*x)^n*(c*f - d*e)^4*(35*n^2 - 50*n - 10*n^
3 + n^4 + 24)) + (d*f*x^3*(c + d*x)^(n - 5)*(3*a*d*f + b*c*f - 4*b*d*e - b*c*f*n + b*d*e*n)*(20*c^2*f^2 - 9*c^
2*f^2*n - d^2*e^2*n + c^2*f^2*n^2 + d^2*e^2*n^2 + 10*c*d*e*f*n - 2*c*d*e*f*n^2))/((e + f*x)^n*(c*f - d*e)^4*(3
5*n^2 - 50*n - 10*n^3 + n^4 + 24))